<%@include file="menu/util.jsp" %>
<%@page contentType="application/xml; charset=iso-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="pointer" value="${requestScope.pointer}" />
<c:set var="dimensionalCuts" value="${requestScope.dimensionalCuts}" />
<c:set var="rootDimensionalCuts" value="${requestScope.rootDimensionalCuts}" />
<c:set var="cutMembers" value="${requestScope.cutMembers}"/>
<c:set var="dataComparators" value="${requestScope.dataComparators}"/>
<c:set var="comparators" value="${requestScope.comparators}"/>
<c:set var="dimensionalCutDates" value="${requestScope.dimensionalCutDates}"/>
<c:set var="dimensionalCutDatesData" value="${requestScope.dimensionalCutDatesData}"/>

<c:set var="rangeDates" value="${requestScope.rangeDates}"/>
<c:set var="cutMembersString" value="${requestScope.cutMembersString}"/>

<c:set var="rootDimensionalCut" value="${requestScope.rootDimensionalCut}"/>
<c:set var="pointerScores" value="${requestScope.pointerScores}"/>
<c:set var="notes" value="${requestScope.notes}"/>

<c:set var="height" value="${requestScope.height}"/>
<c:set var="font" value="${requestScope.font}"/>

<xml>
    <c:forEach var="date" items="${rangeDates}">
        <fmt:formatDate var="dateXML" type="Date" value="${date}" />
        <register date='${dateXML}'>
            <c:forEach var="dimensionalCut" items="${rootDimensionalCuts}">
                <c:forEach var="comparatorDimensionalCut" items="${dimensionalCutDatesData[dimensionalCut][date]}">
                    <c:set var="cutMemberString" value="${cutMembersString[dimensionalCut]}" />
                    <c:choose>
                        <c:when test="${comparatorDimensionalCut != null}">
                            <data cut="${cutMemberString}" type="${comparatorDimensionalCut.comparator.description}" value="${comparatorDimensionalCut.register}" unit="$" postition="PREFIX"></data>
                        </c:when>
                    </c:choose>
                </c:forEach>
            </c:forEach>
        </register>
    </c:forEach>

    <c:forEach var="dimensionalCut" items="${rootDimensionalCuts}">
        <c:forEach var="comparator" items="${comparators}">
            <c:set var="cutMemberString" value="${cutMembersString[dimensionalCut]}" />
            <graphics dimensionalCut="${cutMemberString}" comparator="${comparator.description}" ></graphics>
        </c:forEach>
    </c:forEach>

    <scoreInfo unit="${pointer.unit}" ></scoreInfo>

</xml>